package unittestcase;

import android.R;
import android.app.Activity;
import android.test.ActivityInstrumentationTestCase2;
import android.view.View;
import android.widget.CheckBox;
import android.widget.Spinner;
import android.widget.TextView;

import com.gorillalogic.monkeytalk.demo1.FormsActivity;
import com.gorillalogic.monkeytalk.demo1.LoginActivity;
import com.gorillalogic.monkeytalk.demo1.LogoutActivity;
import com.robotium.solo.Solo;

public class test_form extends ActivityInstrumentationTestCase2<FormsActivity> {

	Solo solo;
	CheckBox chkbox;
	Activity mactivity;
	public test_form() {
		
		super(FormsActivity.class);
	}

	protected void setUp() throws Exception {
		solo = new Solo(getInstrumentation(), getActivity());
		//chkbox=(CheckBox)solo.getCurrentActivity().findViewById(R.id.forms_checkbox);
	}

	protected void tearDown() throws Exception {
		solo.finishOpenedActivities();
	}

	public void testPreferenceIsSaved() throws Exception {

		
		solo.clickOnView(((View)solo.getView("forms_spinner")));
		solo.sleep(1000);
	solo.goBack();
		solo.pressSpinnerItem(0, 2);
		solo.pressSpinnerItem(0, 4);

	solo.clickOnCheckBox(0);
	solo.sleep(1000);
	solo.clickOnCheckBox(0);
	   solo.setProgressBar(0, 1);
	   solo.setProgressBar(0, 10);
	   solo.setProgressBar(0,20);
	   solo.setProgressBar(0, 40);
	}

}
